***************************
*Replication code for:
*Sønderskov, K. M. (2008). Environmental group membership, collective action and generalised trust.
*Environmental Politics, 17(1), 78-94.
******************************

clear all
use replicationdata01
version 14
*Table 1
format egm trust %3.1f
sort egm
list country egm trust if include ==1
*Table 2
pwcorr egm trust pm1 gdp press envcon if include==1,sig list

*Table 3, Model 1
pwcorr d_green d_pm d_gdp d_press d_envcon
mat C=r(C)
mat  Corr = (1,C[1,2],C[1,3],C[1,4],C[1,5]\C[1,2],1,C[2,3],C[2,4],C[2,5]\C[1,3],C[2,3],1,C[3,4],C[3,5]\C[1,4],C[2,4],C[3,4],1,C[4,5]\ ///
C[1,5],C[2,5],C[3,5],C[4,5],1)
foreach var of varlist d_green d_pm d_gdp d_press d_envcon {
su `var'
sca m`var' = r(mean)
sca sd`var' = r(sd)
}
mat SD = (sdd_green, sdd_pm, sdd_gdp, sdd_press, sdd_envcon)
mat M = (md_green, md_pm, md_gdp, md_press, md_envcon)
clear
corr2data d_green d_pm d_gdp d_press d_envcon, n(52) means(M) corr(Corr) sds(SD)
reg d_green d_pm d_gdp d_press d_envcon

*Table 3, model 2
use replicationdata01,clear
reg d_green d_pm d_gdp d_press d_envcon

*Table 3, model 3
reg d_green trust d_pm d_gdp d_press d_envcon 

*Table 3, model 4
reg egm trust pm1 gdp press envcon if e(sample)

*Table 3, model 5
reg ln_egm trust pm1 gdp press envcon if e(sample)
vif

*Table 3, model 6
reg ln_egm       pm1 gdp press envcon if e(sample)

*Table 3, model 7
reg egm c.trust##(c.pm1 c.envcon) gdp press  if e(sample)

*note 13
reg ln_egm trust pm2 gdp press envcon if include == 1, r b
estimates store a
reg ln_egm trust pm2 gni press envcon if include == 1, r b
estimates store b
reg ln_egm trust pm2 gdp civlib envcon if include == 1, r b
estimates store c
reg ln_egm trust pm2 gdp press envcon05 if include == 1, r b
estimates store d
reg ln_egm trust pm2 gni press envcon if include == 1, r b
estimates store e
reg ln_egm trust pm2 gdp civlib envcon if include == 1, r b
estimates store f
reg ln_egm trust pm2 gdp press envcon05 if include == 1, r b
estimates store g
reg ln_egm trust pm2 gni civlib envcon if include == 1, r b
estimates store h
reg ln_egm trust pm2 gni press envcon05 if include == 1, r b
estimates store i
reg ln_egm trust pm2 gdp civlib envcon05 if include == 1, r b
estimates store j
reg ln_egm trust pm2 gni civlib envcon if include == 1, r b
estimates store k
reg ln_egm trust pm2 gni press envcon05 if include == 1, r b
estimates store l
reg ln_egm trust pm2 gdp civlib envcon05 if include == 1, r b
estimates store m
reg ln_egm trust pm1 gni civlib envcon05 if include == 1, r b 
estimates store o
reg ln_egm trust pm2 gni civlib envcon05 if include == 1, r b
estimates store p

est table a b c d e f g h i j k l m o p,p
drop _est*
exit
